﻿CREATE PROC admin.s_Repos_TransferFromAloaners AS
RETURN
--SELECT [ID]
--      ,[ParentID]
--      ,[TableName]
--      ,[Name]
--  FROM [MotoBank].[dbo].[t_State]
--WHERE ParentID = 115
--GO
--
--
----SELECT L_B.LoanID,StateID_AFC
--UPDATE L_B.LoanID,StateID_AFC
--FROM t_Borrower B WITH(nolock)
--INNER JOIN t_Loan_Borrower L_B WITH(nolock) ON L_B.BorrowerID = B.ID
--INNER JOIN t_Loan L WITH(nolock) ON L_B.LoanID = L.ID
--INNER JOIN AFCBANK.AFC.dbo.t_Applicants A ON B.SSN = A.SSN
--INNER JOIN ts_RepoStatesMap RSM ON A.MenuID = StateID_AFC
--WHERE dbo.SSNCheck(B.SSN ) = 1 AND
--			L_B.LoanID > 1000000
